-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix rosie REST API docs #2334
fix rosie REST API docs #2334
Conversation
sphinx/api/rosie-web.rst
Outdated
@@ -152,7 +152,7 @@ REST API | |||
|
|||
.. code-block:: http | |||
|
|||
GET http://host/my_prefix/search?var+bob+nowcast&format=json HTTP/1.1 | |||
GET http://host/my_prefix/search/var+bob+nowcast&format=json HTTP/1.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why doesn't the old syntax work any more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this syntax was ever correct, was it?
It's an invalid URL parameter, must be ?key=value[&key2=value2...]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably either an error copied forward from the old docs or a translation error by yours truely 😦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this meant to instead be:
GET http://host/my_prefix/search/var+bob+nowcast&format=json HTTP/1.1 | |
GET http://host/my_prefix/search?s=var+bob+nowcast&format=json HTTP/1.1 |
The original, as with your change suggestion, both don't make sense as URL queries, but this does? To check I am not completely mistaken, I tried these URLs out on both the current ("old") & my new (PR #2288) versions of the rosie discovery utility, & the original & change here both give a 404 error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think one of these amendments needs changing.
sphinx/api/rosie-web.rst
Outdated
@@ -152,7 +152,7 @@ REST API | |||
|
|||
.. code-block:: http | |||
|
|||
GET http://host/my_prefix/search?var+bob+nowcast&format=json HTTP/1.1 | |||
GET http://host/my_prefix/search/var+bob+nowcast&format=json HTTP/1.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this meant to instead be:
GET http://host/my_prefix/search/var+bob+nowcast&format=json HTTP/1.1 | |
GET http://host/my_prefix/search?s=var+bob+nowcast&format=json HTTP/1.1 |
The original, as with your change suggestion, both don't make sense as URL queries, but this does? To check I am not completely mistaken, I tried these URLs out on both the current ("old") & my new (PR #2288) versions of the rosie discovery utility, & the original & change here both give a 404 error.
The change doesn't give a 404, for example: http://fcm1/rosie/mot/search/frsn However this isn't the user facing page not the REST API! Whoops! |
20061a7
to
3e7afb1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops! s is what we were supposed to document here
There appears to be the same issue with the query
endpoint (see line 94: :param list query: List of queries
) which following that logic should be :param list q:
3e7afb1
to
f29e179
Compare
Yep, that should be the last of them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we could have search?s=
rather than search/?s=
, at the very least for consistency with the query endpoint URL documented above it but also as it is the strict endpoint, but since it gives the same result & I am pedantic, it is not a blocker.
Fix a couple of broken examples in the docs.